home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / PORTABLE.ZIP / WREFRESH.C < prev    next >
Text File  |  1992-11-21  |  2KB  |  56 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3. #undef wrefresh
  4.  
  5. #ifndef        NDEBUG
  6. char *rcsid_wrefresh = "$Header: c:/curses/portable/RCS/wrefresh.c%v 2.0 1992/11/15 03:29:28 MH Rel $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   wrefresh()   - refresh window
  15.  
  16.   X/Open Description:
  17.        The routine wrefresh copies the named window to the physical
  18.        terminal screen, taking into account what is already there in
  19.        order to optimize cursor movement.
  20.  
  21.        The routine refresh does the same, using stdscr as a default
  22.        screen.
  23.  
  24.        These routines must be called to get any output on the
  25.        terminal, as other routines only manipulate data structures.
  26.  
  27.        Unless leaveok has been enabled, the physical cursor of the
  28.        terminal is left at the location of the window's cursor.
  29.  
  30.   X/Open Return Value:
  31.        The wrefresh() function returns OK on success and ERR on error.
  32.  
  33.   X/Open Errors:
  34.        No errors are defined for this function.
  35.  
  36.   Portability:
  37.        PDCurses        int wrefresh( WINDOW* win );
  38.        X/Open Dec '88  int wrefresh( WINDOW* win );
  39.        BSD Curses      int wrefresh( WINDOW* win );
  40.        SYS V Curses    int wrefresh( WINDOW* win );
  41.  
  42. **man-end**********************************************************************/
  43.  
  44. int    wrefresh(WINDOW *win)
  45. {
  46.        if (win == (WINDOW *)NULL)      return( ERR );
  47.        if (win->_flags & _PAD) return( ERR );
  48.  
  49.        if (win == curscr)
  50.                curscr->_clear = TRUE;
  51.        else    
  52.                wnoutrefresh(win);
  53.        doupdate();
  54.        return( OK );
  55. }
  56.